//
//  ChangeNickNameViewCtrler.m
//  MIDI
//
//  Created by 千行时线 on 15/9/15.
//  Copyright (c) 2015年 QXSX. All rights reserved.
//

#import "ChangeNickNameViewCtrler.h"
#import "AppConfig.h"

@interface ChangeNickNameViewCtrler ()
@property (weak, nonatomic) IBOutlet UITextField *nickNameUITextField;

@end

@implementation ChangeNickNameViewCtrler
- (IBAction)endEdit:(id)sender {
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self configNavigationItem];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void) configNavigationItem
{
    [self.tabBarController configNavigationBarTintColor:UIColorRGBA(0, 0, 0, 1)];
    [self.navigationController.navigationBar setBarTintColor:MIDIColorOfNavigationBar];
    self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
    self.navigationItem.title = @"昵称";
    [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],UITextAttributeTextColor, [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0],UITextAttributeTextShadowColor,[UIFont fontWithName:@"Hiragino Sans GB" size:18.0],UITextAttributeFont,nil]];
    
    [self configNavigationBackAction:^{
        
        [self.navigationController popViewControllerAnimated:YES];
    }];
    
    UIBarButtonItem *rightBar = [[UIBarButtonItem alloc] initWithTitle:@"保存" style:UIBarButtonItemStyleBordered target:self action:@selector(pressRight:)];
    UIFont *rightFont = [UIFont fontWithName:@"Hiragino Sans GB" size:13.0];
    UIColor *rightColor = [UIColor whiteColor];
    
    NSDictionary * attributes = @{NSFontAttributeName:rightFont , NSForegroundColorAttributeName:rightColor };
    [rightBar setTitleTextAttributes:attributes forState:UIControlStateNormal];
    [self.navigationItem setRightBarButtonItem:rightBar];
    
}

-(void)pressRight:(UIButton *)sender
{
    NSLog(@"right");
}

@end
